Replace hardcoded 0 with CurveOffsetCornerStyle.NONE enum in curve offset method#1495
Closed
Copilot wants to merge 4 commits into
Closed
Replace hardcoded 0 with CurveOffsetCornerStyle.NONE enum in curve offset method#1495Copilot wants to merge 4 commits into
Copilot wants to merge 4 commits into
Conversation
Co-authored-by: gonzalocasas <933277+gonzalocasas@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix enum for Offset arguments in curve.py
Replace hardcoded 0 with CurveOffsetCornerStyle.None enum in curve offset method
Oct 21, 2025
gonzalocasas
requested changes
Oct 21, 2025
Member
gonzalocasas
left a comment
There was a problem hiding this comment.
@copilot apply review feedback
Co-authored-by: gonzalocasas <933277+gonzalocasas@users.noreply.github.com>
Copilot
AI
changed the title
Replace hardcoded 0 with CurveOffsetCornerStyle.None enum in curve offset method
Replace hardcoded 0 with CurveOffsetCornerStyle.NONE enum in curve offset method
Oct 21, 2025
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1495 +/- ##
==========================================
- Coverage 62.21% 62.19% -0.03%
==========================================
Files 208 208
Lines 22437 22437
==========================================
- Hits 13960 13955 -5
- Misses 8477 8482 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
@copilot add an entry to the changelog |
Co-authored-by: gonzalocasas <933277+gonzalocasas@users.noreply.github.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Successfully replaced the hardcoded
0parameter in theOffsetmethod call with the proper enumRhino.Geometry.CurveOffsetCornerStyle.NONE.Changes Made
import Rhino # type: ignoreat the top of the filecorner_stylevariable usingRhino.Geometry.CurveOffsetCornerStyle.NONE0with thecorner_stylevariable in the Offset callImplementation Note
The enum member is accessed as
NONE(uppercase) rather thanNoneto avoid Python keyword conflicts. This pattern is consistent with other Rhino enum usage in the codebase (e.g.,PipeCapMode.NONE,IsoStatus.NONE).Security Summary
No security vulnerabilities were found in the changes.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.